import {getBaseChartConfig, barData} from '@/package/widget/chart/01base/util'

export default {
  name: '基础柱状图',
  icon: '/img/chart/bar1.png',
  type: '柱状图',
  cptKey: 'bar01',
  width: 500,
  height: 300,
  dynamic: true,
  options: {
    cptDataForm: {
      dataText: JSON.stringify(barData),
      dataSource: 1,
      pollTime: 0
    },
    attribute: {
      ...getBaseChartConfig(),
      series: {
        showBackground: false, // 柱体背景
        label: {
          show: false,
          position: 'top',
          formatter: '{a}:{c}',
          color: '#FFF',
          fontSize: 12
        },
        barWidth: '', // 宽度
        itemStyle: {
          borderRadius: [5, 5, 0, 0]
        }
      }
    }
  }
}
